package com.wx.mall.common.exception.code;

public enum BaseResponseCode implements ResponseCodeInterface {
    /**
     * 这个要和前端约定好
     */
    SUCCESS(0, "操作成功"),
    SYSTEM_ERROR(5000001, "系统异常请稍后再试"),
    METHOD_IDENTITY_ERROR(4000002, "数据校验异常"),
    ;

    /**
     * 响应码
     */
    private int code;

    /**
     * 提示
     */
    private String msg;

    BaseResponseCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
